/*
 * Copyright (c) 2025 Li Auto Inc. and its affiliates
 * Licensed under the Apache License, Version 2.0(the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

 /*
 * Description: task Configuration
 * AutoGenerate Code, DO NOT EDIT!!!
 * {{get_generation_time()}}
 * {{get_project_name()}}
 * {{get_vcos_version()}}
 */

#ifndef APP_CFG_OS_TASK_CFG_H
#define APP_CFG_OS_TASK_CFG_H

#ifdef __cplusplus
extern "C"
{
#endif

/* Including File */
#include "os_task.h"

/* global Macro Definition */

/* global Enumeration Definition */

{%- set app_cfg = get_app_cfg() %}

typedef enum {
{%- for app, app_val in app_cfg.items() %}
    {%- for task in app_val["AppTaskList"] %}
    OS_TASK_{{task.upper()}}_ID,
    {%- endfor %}
{%- endfor %}
    OS_TASK_CNT,
    OS_TASK_NONE
} OS_TASKID_DEF;

/* global type & Structure Definition */

/* global Variable Declaration */

{%- for app, app_val in app_cfg.items() %}
    {%- if app_val["AppTaskList"]: %}
#define OS_START_SEC_CONST
#include "os_memmap.h"
extern CONSTP2CONST(os_task_cfg_t, AUTOMATIC, OS_CONST) {{app_val["AppTaskTable"]}}[];
extern CONST(OsObjIndexType, OS_CONST) {{app_val["AppTaskTable"]}}_size;
#define OS_STOP_SEC_CONST
#include "os_memmap.h"
    {%- endif %}

{%- endfor %}

/* global Function Declaration */
{%- for app, app_val in app_cfg.items() %}
    {%- for task in app_val["AppTaskList"] %}
extern void os_task_{{task.lower()}}(void *arg);
    {%- endfor %}
{%- endfor %}

/* global Function Implementation */

#ifdef __cplusplus
}
#endif

#endif /* APP_CFG_OS_TASK_CFG_H */

